package com.wpw.dream.thread;

public class ThreadStop {

	public static void main(String[] args) {
		try {
			new Thread(new ZeroE()).start();
		} catch (Exception e) {
			// 主线程中无法捕获到这个异常
			System.out.println("-----------------线程中有异常-----------");
		}
	}

}

class ZeroE implements Runnable {
	@Override
	public void run() {
		try {
			System.out.println(2 / 0);
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}
}